package com.yssoft.controller.supervise;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.yssoft.controller.BaseController;
import com.yssoft.entity.supplier.BillCountCustom;
import com.yssoft.entity.supplier.ProductionBatch;
import com.yssoft.service.supervise.ProductionBatchService;

@Controller
@RequestMapping("/supervise/productionBatch")
public class ProductionBatchController  extends BaseController{
	
	private static Logger logger=Logger.getLogger(ProductionBatchController.class);
	@Resource
	private ProductionBatchService productionBatchService;
	/**
	 * 
	    * @Title: 生产批次查询页
	    * @Description: 进入list页面
	    * @param @param model
	    * @param @return    参数
	    * @return String    返回类型
	    * @throws
	 */
	@RequestMapping(value="/list")
	public String list(Model model) {
		return "supervise/traceabilityQuery/productionBatchList";
	}
	
	@ResponseBody
	@RequestMapping(value = "productionBatchPage")
	public JSONObject billPage(@RequestParam(name = "page",defaultValue = "0") int page ,
							   @RequestParam(name = "limit",defaultValue = "10") int limit, 
							   ProductionBatch  custom  ) throws IllegalAccessException, ClassNotFoundException{
        JSONObject jsonObject = productionBatchService.queryProductionBatchPage(page, limit, custom);
        return jsonObject;
    }
}
